#ifndef __SKYSPHERECAMERA_H__
#define __SKYSPHERECAMERA_H__

#include "common.h"
#include "core/Camera.h"

namespace OBR
{
class SkySphereCamera : public Camera, public Configurable<SkySphereCamera>
{
    /*data*/
public:
    float3 orig;

private:
    static OptixProgramGroup program_group;

    /*methods*/
public:
    SkySphereCamera(float3 orig = make_float3(0.0f));
    ~SkySphereCamera();

    /* --------------------------- override Camera -------------------------- */

    void rotate(float2 deg) override;
    void translate(float2 dir) override;
    void zoom(float dist) override;

    /* ------------------------ override ProgramEntry ----------------------- */

    /**
     * @brief upload data to sbt payload
     *
     */
    void uploadSbtData() override;

protected:
    /* ------------------------ override Configurable ----------------------- */

    /**
     * @brief create object from config
     *
     * @param config
     */
    void _buildFromConfig(const Json::Value &config) override;

private:
    /* ------------------------ override ProgramEntry ----------------------- */

    /**
     * @brief Get the Program Group Options of this type
     *
     * @return OptixProgramGroupOptions&
     */
    OptixProgramGroupOptions &getProgramGroupOptions() override;

    /**
     * @brief Get the Program Group Desc of this type
     *
     * @return OptixProgramGroupOptions&
     */
    OptixProgramGroupDesc &getProgramGroupDesc() override;
};

} // namespace OBR
#endif